home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PAS_0493 / UNITDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-15  |  3KB  |  68 lines

  1. {─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  2. Msg  : 119 of 150
  3. From : Sean Palmer                         1:104/123.0          08 Apr 93  15:37
  4. To   : All
  5. Subj : G:Smooth Text Mouse prog
  6. ────────────────────────────────────────────────────────────────────────────────
  7. **** SOMETHING IS WRONG WITH THIS PROGRAM OR THE UNITS IT USES! ****
  8.  
  9. it leaves mouse trails on the screen, seemingly at random, and I can't figure
  10. it out. PLEASE HELP! It only happens when hiding and showing the mousecursor,
  11. if you just leave it on all the time it's fine (but you have to hideit
  12. sometimes if you modify the screen at all...)
  13.  
  14. I've tried disabling interrupts in various places but it doesn't help. My
  15. logic seems to be ok, but every once in a while it will just fail to erasethe
  16. cursor...
  17.  
  18. Whoever points out the error will get his/her name in the credits and my
  19. eternal gratitude!! }
  20.  
  21.  
  22. { Unit Demo v1.0 }
  23. {   03/28/93     }
  24. { Just a junker program that demonstrates how to use my other units }
  25. { Copyright (c) 1993 Sean L. Palmer }
  26. { Released to the Public Domain }
  27.  
  28. { You may distribute this freely and incorporate it with no royalties. }
  29. { Please credit me if your program uses these routines! }
  30. { If you really like them or learn something neat from me then I'd }
  31. { appreciate a small ($1 to $5) donation. }
  32. { Or contact me if you need something programmed or like my work... }
  33. { I probably have the wierdest indenting style for pascal ever! 8)  }
  34. { And, by God my stuff is optimized!! }
  35.  
  36. { Sean L. Palmer (aka Ghost)}
  37. { 2237 Lincoln St. }
  38. { Longmont, CO 80501 }
  39. { (303) 651-7862 }
  40. { also on FIDO, or at palmers@spot.colorado.edu }
  41.  
  42. program unitDemo;
  43. uses crt,fnt8x8,rodent,sync; {requires vga,mouse,Turbo Pascal 6.0,and 286+}
  44.  
  45. var done:boolean;
  46. procedure drawRodent;far;begin fnt8x8.drawMouse(rodent.x,rodent.y);end;
  47. procedure erasRodent;far;begin fnt8x8.eraseMouse;end;
  48. procedure liftRodent;far;begin done:=true; end;
  49.  
  50. var i:byte;
  51. begin
  52.  textattr:=8*16+7;clrscr;
  53.  for i:=0 to 255 do memw[$B800:640+2*i]:=i+(i shl 8);
  54.  rodent.confine(0,0,633,392);
  55.  rodent.drawHook(drawRodent);
  56.  rodent.erasHook(erasRodent);
  57.  rodent.liftHook(liftRodent);
  58.  rodent.show(true);
  59.  done:=false;
  60.  repeat
  61.   sync.tick;   {synchronize with timer tick}
  62.   rodent.show(false);
  63.   gotoxy(1,1); write(sync.ticks:5); {demonstrate hiding mouse while updating}
  64.   rodent.show(true);
  65.   if keypressed then begin done:=true; readkey; end;
  66.   until done;
  67.  rodent.show(false);
  68.  end.